TARGET = server
CC = g++
CFLAGS = -Wall -g
LIBS = -lpthread -lmysqlpp 

OBJECTS = main.o clnt_connection.o init_server.o coder.o connect_mysql.o

$(TARGET) : $(OBJECTS)
	$(CC) -o $(TARGET) $(OBJECTS) $(LIBS) $(CFLAGS)

clnt_connection.o : coder.o
	$(CC) -c -g  clnt_connection.cpp -I/usr/include/mysql

coder.o : 
	$(CC) -c -g coder.cpp

init_server.o : 
	$(CC) -c -g init_server.cpp

connect_mysql.o :
	$(CC) -c -g connect_mysql.cpp -I/usr/include/mysql

clean :
	rm -rf $(OBJECTS)
	rm -rf $(TARGET)
